#include<stdio.h>
int main()
{
    __int64 a ,b, c, d, n, num;
    while( scanf("%I64d",&n) != EOF && n)
    {
        num = 1;
        a = 0;
        while( ( n & 1 ) == 0 )
        {
            n >>= 1;
            a++;
        }
        num *= ( a + 1 ); a = 0;
        while( n % 3 == 0 )
        {
            n /= 3;
            a++;
        }
        num *= ( a + 1 ); a = 0;
        while( n % 5 == 0 )
        {
            n /= 5;
            a++;
        }
        num *= ( a + 1 ); a = 0;
        while( n % 7 == 0 )
        {
            n /= 7;
            a++;
        }
        num *= ( a + 1 );
        printf("%I64d\n", num);
    }
}
